package com.stylefeng.guns.modular.system.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.stylefeng.guns.modular.system.model.Bank;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author stylefeng123
 * @since 2018-07-02
 */
public interface BankMapper extends BaseMapper<Bank> {

    /**
     * 获取银行信息
     * @param bankName
     * @param platform
     * @param status
     * @param bankType
     * @param beginDate
     * @param endDate
     * @return
     */
    List<Bank> serach(@Param("bankName") String bankName, @Param("platform") String platform,@Param("status")Integer status, @Param("bankType")Integer bankType, @Param("beginDate")String beginDate,@Param("endDate")String endDate);


    /**
     * 批量添加银行数据
     * @param list
     */
    void adds(List<Bank> list);

    /**
     * 统计银行的解冻资金
     * @param platform
     * @param beginDate
     * @param endDate
     * @return
     */
    Bank thawMoney(@Param("platform")String platform, @Param("beginDate")Date beginDate,@Param("endDate")Date endDate);

    /**
     * 统计银行的冻结资金
     * @param platform
     * @param beginDate
     * @param endDate
     * @return
     */
    Bank freezeMoney(@Param("platform")String platform, @Param("beginDate")Date beginDate,@Param("endDate")Date endDate);

    /**
     * 获取某一天的银行余额
     * @param revtime
     * @return
     */
    Bank getOneDayBalance(@Param("platform")String platform,@Param("revtime")Date revtime);



    Bank getRusumbank(@Param("platform")String platform, @Param("revtime") String revtime, @Param("banktype") int banktype, @Param("status") int status);

    Bank  getChusumbank(@Param("platform")String platform,@Param("revtime") String revtime,@Param("banktype") int banktype,@Param("status") int status);

}
